#include <iostream>
#include "AudioReader.h"
#include "../Model/AudioBook.h"
#include <dirent.h>
//#include <sys/stat.h>

using namespace std;
void AudioReader::makeFileList(AudioBook & book,std::string path) {
	DIR * d = opendir(path.c_str());
	//std::cout << path << "\n";
	dirent * dp;
	dp = readdir(d);
	dp = readdir(d);
//	struct stat statbuf;
	
	while (dp = readdir(d)) {
		book.addFile(path + "/" + dp->d_name);
		//stat((path + "/" + dp->d_name).c_str(), &statbuf);
		///book.addSize(statbuf.st_size);
	}
	//std::cout << "file list made" << "\n";
}
